package net.example.model;

import net.example.utils.SerializeHelper;

import java.util.ArrayList;
import java.util.List;

import io.netty.buffer.ByteBuf;

public class AddFriendRequestPage {

    public List<AddFriendRequest> AddFriendRequestList ;

    public int TotalEntityCount ;


    public void deserialize(byte[] info) throws Exception {
        ByteBuf buffer = SerializeHelper.wrappedBuffer(info);
        buffer.readInt();
        int count = buffer.readInt();
        this.AddFriendRequestList = new ArrayList<>();
        for (int i = 0; i < count; i++) {
            AddFriendRequest addFriendRequest = new AddFriendRequest();
            addFriendRequest.deSerialize(buffer);
            this.AddFriendRequestList.add(addFriendRequest);
        }
        this.TotalEntityCount = buffer.readInt();
    }
}

